 :root { --color-primary: #39027c; --color-secondary: #2f0530; --color-accent: #5704bd; --color-success: #3aa935; --bg-light: #f3f3f3; --font-main: "Montserrat", sans-serif; --sidebar-width: 260px; } * { box-sizing: border-box; } body { font-family: var(--font-main); margin: 0; background-color: #fff; color: #333; display: flex; flex-direction: column; min-height: 100vh; } .w3-topbar { background-color: var(--color-primary); color: white; padding: 16px 24px; font-weight: 600; font-size: 20px; position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } .w3-layout { display: flex; flex: 1; } .w3-sidebar { width: var(--sidebar-width); background-color: var(--bg-light); height: calc(100vh - 60px); position: sticky; top: 60px; overflow-y: auto; border-right: 1px solid #e0e0e0; padding-top: 16px; } .w3-sidebar h3 { font-size: 14px; color: #666; padding: 0 24px; margin-bottom: 8px; text-transform: uppercase; } .w3-sidebar a { display: block; padding: 10px 24px; color: #000; text-decoration: none; font-size: 15px; font-weight: 600; transition: all 0.2s ease; border-left: 4px solid transparent; } .w3-sidebar a:hover { background-color: #e0e0e0; } .w3-sidebar a.active { background-color: #e6e6e6; color: var(--color-accent); border-left: 4px solid var(--color-accent); } .w3-content { flex: 1; padding: 40px 6%; max-width: 1000px; } .w3-content h1 { color: var(--color-primary); font-size: 40px; margin-top: 0; border-bottom: 2px solid var(--bg-light); padding-bottom: 16px; margin-bottom: 24px; } .w3-content h2 { color: var(--color-accent); margin-top: 40px; } .w3-content p { line-height: 1.8; font-size: 16px; margin-bottom: 20px; color: #444; } .w3-example { background-color: #f1f1f1; padding: 20px; margin: 24px 0; border-radius: 4px; border-left: 4px solid var(--color-success); } .w3-example h3 { margin-top: 0; font-size: 18px; color: #000; } .w3-code { background-color: #fff; border-left: 4px solid var(--color-primary); padding: 16px; overflow-x: auto; font-family: Consolas, 'Courier New', monospace; font-size: 14px; color: #c00; margin-top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); white-space: pre; } @media (max-width: 768px) { .w3-layout { flex-direction: column; } .w3-sidebar { width: 100%; height: auto; position: relative; top: 0; display: flex; overflow-x: auto; white-space: nowrap; padding: 0; border-right: none; border-bottom: 1px solid #ddd; } .w3-sidebar h3 { display: none; } .w3-sidebar a { display: inline-block; border-left: none; border-bottom: 4px solid transparent; } .w3-sidebar a.active { border-left: none; border-bottom: 4px solid var(--color-accent); } .w3-content { padding: 24px 5%; } } .preview-box { border: 1px solid #ddd; background-color: #fafafa; background-image: radial-gradient(#e0e0e0 1px, transparent 1px); background-size: 20px 20px; padding: 32px 24px; border-radius: 8px 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; } .mini-code { background-color: #282a36; color: #f8f8f2; padding: 16px 20px; border-radius: 0 0 8px 8px; font-family: Consolas, 'Courier New', monospace; font-size: 13.5px; overflow-x: auto; margin-top: 0; margin-bottom: 24px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); } .mini-code code { white-space: pre; color: #50fa7b; } .inline-code { background-color: #f4f4f4; color: var(--color-primary); padding: 2px 8px; border-radius: 4px; font-family: Consolas, 'Courier New', monospace; font-size: 0.9em; border: 1px solid #e0e0e0; }